%%% -------------------------------------------------------------------
%%%
%%% http://www.9miao.com
%%% -------------------------------------------------------------------
-module(only_has_finished_quest_script).

-export([acc_script/1,get_CheckList/1]).

-define(ONLY_HAS_FINISHED_QUEST_SCRIPT,[
{120200002,[140100015]},
{140200003,[120200002]},
{140300002,[140200003]},
{140300401,[140300002]},
{140300402,[140300401]},
{140300408,[140300402]},
{140300403,[140300408]},
{140300404,[140300403]},
{140300409,[140300404]},
{140300406,[140300409]},
{140300407,[140300406]},
{100300005,[140300407]},
{140300006,[100300005]},
{120300202,[100300005]},
{110300007,[140300006]},
{140300008,[110300007]},
{110300009,[140300008]},
{140300010,[110300009]},
{150300011,[140300010]},
{140300012,[150300011]},
{140300013,[140300012]},
{120300014,[140300013]},
{120300914,[120300014]},
{120300915,[120300914]},
{120300015,[120300915]},
{160300016,[120300015]},
{140300017,[160300016]},
{140300405,[120300015]},
{140300499,[140300405]},
{140300018,[140300499]},
{100300019,[140300018]},
{100300021,[100300019]},
{120300023,[100300021]},
{100300022,[120300023]},
{140300025,[100300022]},
{140300026,[140300025]},
{100300027,[140300026]},
{140300028,[100300027]},
{140300029,[140300028]},
{140300030,[140300029]},
{140300031,[140300030]},
{141399032,[140300031]},
{142399032,[140300031]},
{143399032,[140300031]},
{180300134,[140300031]},
{120500002,[140599001]},
{120500003,[120500002]},
{140500004,[120500003]},
{140500005,[140500004]},
{100500009,[140500005]},
{120500010,[100500009]},
{110500011,[120500010]},
{140500013,[110500011]},
{120500014,[140500013]},
{160500015,[120500014]},
{100500016,[160500015]},
{140500017,[100500016]},
{140500018,[140500017]},
{160500019,[140500018]},
{140500020,[160500019]},
{160500021,[140500020]},
{140500022,[160500021]},
{100500023,[140500022]},
{120500024,[100500023]},
{140500025,[120500024]},
{140500026,[140500025]},
{140500027,[140500026]},
{100500028,[140500027]},
{160500029,[100500028]},
{140500030,[160500029]},
{140500031,[140500030]},
{140500032,[140500031]},
{140500033,[140500032]},
{140500034,[140500033]},
{141599035,[140500034]},
{142599035,[140500034]},
{143599035,[140500034]},
{141399035,[140300034]},
{100300037,[141399035]},
{110300036,[100300037]},
{130300038,[110300036]},
{110300039,[130300038]},
{110330039,[110300039]},
{190300001,[110330039]},
{190300002,[190300001]},
{190300003,[190300002]},
{190300007,[190300003]},
{110500601,[190300007]},
{110500602,[110500601]},
{110500603,[110500602]},
{110300139,[190300007]},
{140300040,[110300139]},
{110310039,[140300040]},
{140300041,[110310039]},
{130600001,[140300041]},
{140600002,[130600001]},
{120600003,[140600002]},
{120600004,[120600003]},
{120600006,[120600004]},
{220600006,[120600006]},
{320600006,[220600006]},
{110600007,[320600006]},
{120600008,[110600007]},
{190300004,[120600008]},
{220600008,[190300004]},
{120600010,[220600008]},
{140600009,[120600010]},
{120600011,[140600009]},
{120600016,[120600011]},
{220600010,[120600011]},
{120600013,[220600010]},
{110600024,[120600013]},
{120600014,[110600024]},
{120600017,[120600014]},
{140600019,[120600017]},
{190300020,[120600017]},
{140600025,[140600019]},
{140600028,[140600025]},
{140600029,[140600028]},
{140600030,[140600029]},
{190300012,[140600030]},
{190300005,[190300012]},
{190300006,[190300005]},
{190300008,[190300006]},
{190300011,[190300008]},
{190300015,[190300011]},
{140600130,[190300011]},
{140300042,[140600130]},
{140300043,[140300042]},
{140300044,[140300043]},
{100300045,[140300044]},
{160300046,[100300045]},
{140300047,[160300046]},
{140300050,[140300047]},
{150300050,[140300050]},
{190300009,[140300050]},
{190300013,[190300009]},
{140300051,[150300050]},
{140300052,[140300051]},
{120300053,[140300052]},
{110300054,[120300053]},
{140300055,[110300054]},
{120300056,[140300055]},
{140300057,[120300056]},
{140300058,[140300057]},
{190300010,[140300058]},
{190300014,[190300010]},
{150300058,[140300058]},
{140300059,[150300058]},
{120300060,[140300059]},
{120300061,[120300060]},
{120300062,[120300061]},
{120300063,[120300062]},
{120300064,[120300063]},
{120300065,[120300064]},
{110300066,[120300065]},
{150300066,[110300066]},
{160300066,[110300066]},
{140300067,[150300066]},
{111399068,[140300067]},
{110300069,[111399068]},
{140300070,[110300069]},
{141399071,[140300070]},
{120300072,[141399071]},
{140300073,[120300072]},
{140300074,[140300073]},
{140300075,[140300074]},
{110300076,[140300075]},
{140300077,[110300076]},
{140300078,[140300077]},
{190300016,[140300078]},
{190300017,[190300016]},
{150300073,[140300078]},
{140300079,[150300073]},
{100300080,[140300079]},
{160300081,[100300080]},
{190300018,[160300081]},
{190300019,[190300018]},
{150600230,[160300081]},
{150600231,[150600230]},
{140300083,[140300082]},
{140300084,[140300083]},
{140500036,[140300084]},
{140500037,[140500036]},
{140500038,[140500037]},
{141000001,[140500038]},
{111000002,[141000001]},
{141000003,[111000002]},
{110300085,[141000003]},
{140300086,[110300085]},
{140300087,[140300086]},
{101000004,[140300087]},
{111000005,[101000004]},
{121000006,[111000005]},
{141000007,[121000006]},
{141000008,[141000007]},
{141000009,[141000008]},
{141000010,[141000009]},
{120300088,[141000010]},
{120300089,[120300088]},
{120300090,[120300089]},
{120300091,[120300090]},
{120300092,[120300091]},
{140300093,[120300092]},
{140300094,[140300093]},
{140300095,[140300094]},
{140300096,[140300095]},
{140300097,[140300096]},
{140300098,[140300097]},
{140300099,[140300098]},
{140300100,[140300099]},
{140300101,[140300100]},
{100300102,[140300101]},
{110300103,[100300102]},
{140300104,[110300103]},
{140300105,[140300104]},
{140300106,[140300105]},
{110300107,[140300106]},
{140300108,[110300107]},
{140300109,[140300108]},
{110500202,[110500201]},
{110500203,[110500202]},
{110500204,[110500203]},
{110500205,[110500204]},
{120600202,[120600201]},
{120600203,[120600202]},
{140600204,[120600203]},
{100600205,[140600204]},
{140600206,[100600205]},
{110600208,[110600207]},
{110600209,[110600208]},
{120600211,[120600210]},
{120600212,[120600211]},
{140600213,[120600212]},
{140600215,[110600214]},
{110600216,[140600215]},
{150600218,[150600217]},
{150600219,[150600218]},
{140300110,[140300109]},
{140300111,[140300110]},
{140300112,[140300111]},
{140300113,[140300112]},
{140300114,[140300113]},
{140300115,[140300114]},
{140300116,[140300115]},
{140300117,[140300116]},
{140300118,[140300117]},
{140300119,[140300117]},
{140300120,[140300117]},
{140300121,[140300117]},
{140300122,[140300117]},
{140300123,[140300122]},
{140300124,[140300122]},
{140300125,[140300122]},
{140300128,[140300127]},
{140300129,[140300128]},
{140300130,[140300129]},
{140300131,[140300130]},
{140300132,[140300131]},
{140300133,[140300132]},
{140300134,[140300133]},
{140300135,[140300134]},
{140300136,[140300135]},
{140300137,[140300136]},
{140300138,[140300137]},
{100701998,[100701999]},
{100701997,[100701998]},
{100701996,[100701997]},
{100701995,[100701996]},
{100701994,[100701995]},
{100701993,[100701994]},
{100701992,[100701993]},
{100701991,[100701992]},
{100701990,[100701991]},
{100701989,[100701990]},
{100701988,[100701989]},
{100701987,[100701988]},
{100701986,[100701987]},
{100701985,[100701986]},
{100701984,[100701985]},
{100701983,[100701984]},
{100701982,[100701983]},
{100701981,[100701982]},
{100701980,[100701981]},
{100701979,[100701980]},
{100701978,[100701979]},
{100701977,[100701978]},
{100701976,[100701977]},
{100701975,[100701976]},
{140300139,[100701975]},
{140300140,[140300139]},
{140300141,[140300140]},
{140300142,[140300141]},
{140300143,[140300142]},
{140300144,[140300143]},
{140300145,[140300143]},
{140300146,[140300143]},
{140300147,[140300143]},
{140300148,[140300147]},
{140300149,[140300148]},
{101200002,[101200001]},
{101200003,[101200002]},
{101200004,[101200003]},
{101200005,[101200004]},
{101200006,[101200005]},
{101200007,[101200006]},
{101200008,[101200007]},
{101200009,[101200008]},
{101200010,[101200009]},
{101200011,[101200010]},
{101200012,[101200011]},
{101200013,[101200012]},
{101200014,[101200013]},
{101200015,[101200014]},
{101200016,[101200015]},
{101200017,[101200016]},
{101200018,[101200017]},
{101200019,[101200018]},
{101200020,[101200019]},
{101200022,[101200021]},
{901200002,[901200001]},
{901200003,[901200002]},
{901200004,[901200003]},
{901200005,[901200004]},
{901200006,[901200005]},
{901200007,[901200006]},
{901200009,[901200008]},
{901200010,[901200009]},
{901200011,[901200010]},
{901200012,[901200011]},
{901200013,[901200012]},
{901200014,[901200013]},
{901200015,[901200014]},
{901200016,[901200015]},
{901200017,[901200016]},
{901200018,[901200017]},
{901200020,[901200019]},
{901200021,[901200020]},
{901200022,[901200021]},
{901200023,[901200022]},
{901200024,[901200023]},
{901200025,[901200024]},
{901200026,[901200025]},
{901200027,[901200026]},
{901200028,[901200027]},
{901200029,[901200028]},
{901200030,[901200029]},
{901200032,[901200031]},
{901200033,[901200032]},
{901200034,[901200033]},
{901200035,[901200034]},
{901200036,[901200035]},
{901200037,[901200036]},
{901200038,[901200037]},
{901200039,[901200038]},
{901200040,[901200039]},
{901200041,[901200040]},
{901200042,[901200041]},
{901200043,[901200042]},
{901200044,[901200043]},
{901022046,[901022045]},
{901022047,[901022046]},
{901022048,[901022047]},
{901022049,[901022048]},
{901022050,[901022049]},
{901022051,[901022050]},
{901022052,[901022051]},
{901022054,[901022053]},
{901022055,[901022054]},
{901022056,[901022055]},
{901022057,[901022056]},
{901022059,[901022058]},
{901022060,[901022059]},
{901022061,[901022060]},
{901022062,[901022061]},
{901022063,[901022062]},
{901022064,[901022063]},
{150600220,[140300041]},
{150600221,[130600001]},
{150600222,[130600001]},
{150600223,[120600003]},
{150600224,[120600004]},
{150600225,[140600005]},
{150600226,[140600005]},
{150600227,[140600005]},
{150600228,[220600008]},
{150600229,[220600008]},
{141500002,[141500001]},
{141500003,[141500002]},
{141500004,[141500003]},
{141500005,[141500004]},
{141500006,[141500005]},
{141500007,[141500006]},
{141500008,[141500009]},
{141500010,[141500009]},
{141500011,[141500010]},
{141500012,[141500011]},
{141500013,[141500012]},
{141500014,[141500013]},
{141500015,[141500014]},
{141500016,[141500015]},
{141500017,[141500016]},
{141500018,[141500017]},
{141500019,[141500018]},
{141500020,[141500019]},
{141500021,[141500020]},
{141500022,[141500021]},
{141500023,[141500022]},
{141500024,[141500023]},
{141500025,[141500024]},
{141500026,[141500025]}]).
acc_script(QuestId)->
    CheckList=get_CheckList(QuestId),
    F = fun(QId,Acc0)->
		case Acc0 of
		    false->
			false;
		    true->
			script_op:has_been_finished(QId)
		end end,
		lists:foldl(F,true,CheckList).
get_CheckList(QuestId)->
    case lists:keyfind(QuestId,1,?ONLY_HAS_FINISHED_QUEST_SCRIPT) of
		false->
			if
			QuestId == 140599001->
			   case script_op:get_class() of
				   1->
					   [141399032];
				   2->
					   [142399032];
				   3->
					   [143399032]
			   end;
			QuestId == 140300034->
			   case script_op:get_class() of
				   1->
					   [141599035];
				   2->
					   [142599035];
				   3->
					   [143599035]
			   end;
			QuestId == 140300127->
			   case script_op:get_class() of
				   3->
					   [140300123];
				   1->
					   [140300124];
				   2->
					   [140300125]
			   end;
			QuestId == 140300126->
			   case script_op:get_class() of
				   3->
					   [140300123];
				   1->
					   [140300124];
				   2->
					   [140300125]
			   end;
			true->
				[]
			end;
		{_,CheckList}->
			CheckList
    end.


	
	
		      
